package com.hgyc.mom.mes.enums;

/**
 * 工单状态字典类
 * 自动生成的枚举类，请勿手动修改

 * @author fwj
 * @since 2025-07-12 16:14:34
 * @version 1.0
 **/
public enum WorkOrderStatusEnum {
    PREPARE("PREPARE", "草稿"),
    RELEASED("RELEASED", "已下达"),
    IN_PROGRESS("IN_PROGRESS", "生产中"),
    PAUSED("PAUSED", "暂停中"),
    FINISHED("FINISHED", "已完成"),
    CLOSED("CLOSED", "已关闭"),
    CANCELED("CANCELED", "已取消"),
    PENDING_APPROVAL("PENDING_APPROVAL", "待审核"),
    APPROVING("APPROVING", "审核中"),
    APPROVED("APPROVED", "已审核"),
    REJECTED("REJECTED", "已驳回")
    ;

    private final String value;
    private final String label;

    WorkOrderStatusEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return this.value;
    }

    public String getLabel() {
        return this.label;
    }

    public static WorkOrderStatusEnum of(String value) {
        if (value == null) {
            return null;
        }
        for (WorkOrderStatusEnum item : WorkOrderStatusEnum.values()) {
            if (item.value.equals(value)) {
                return item;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.label;
    }
}

